package top.byteio.common.message.config;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import top.byteio.common.message.factory.NoticeMessagerFactory;

@Slf4j
@Configuration
@RequiredArgsConstructor
@EnableConfigurationProperties(MessageProperties.class)
public class MessageConfiguration {

    private final MessageProperties messageProperties;


    @Bean
    public NoticeMessagerFactory noticeMessagerFactory() {
        return new NoticeMessagerFactory(messageProperties);
    }
}
